package com.example.warehouse_manager.service;

//user_info表的service接口

import com.example.warehouse_manager.dto.AssignRoleDto;
import com.example.warehouse_manager.entity.Result;
import com.example.warehouse_manager.entity.User;
import com.example.warehouse_manager.page.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface UserService {

    //根据账号查询用户业务的方法
    public User queryUserByCode(String userCode);

    //分页查询用户
    public Page queryUserByPage(@Param("page") Page page, @Param("user") User user);

    //添加用户
    public Result saveUser(User user);

    //更改用户禁用、启用状态
    public Result updateState(User user);

    //给用户分配角色
    public void assignRole(AssignRoleDto assignRoleDto);

    //删除用户
    public Result removeUserById(List<Integer> userId);

    //修改用户昵称
    public Result setUserById(User user);

    //根据用户id重置密码
    public Result setPwdById(Integer userid);



}
